<?php

use Illuminate\Database\Schema\Blueprint;

class CreateUsers extends \App\Utils\CreateMigration
{

    function columns(Blueprint $table)
    {
        $table->string('role_tag', 50)->default('')->comment('角色标签');
        $table->string('username', 50)->comment('用户名');
        $table->string('password', 50)->nullable()->comment('密码');
        $table->unsignedTinyInteger('status')->default(1)->comment('状态 1,正常 @US');
        $table->char('salt', 4)->nullable()->comment('密码盐');
        $table->string("name", 50)->nullable()->comment("名称");
        $table->string("mobile", 20)->nullable()->comment("手机号");
        $table->string('desc')->nullable()->comment('备注');
        $table->index(['deleted_at', 'role_tag'], 'index_deleted_role_tag');
        $table->unique(['deleted_at', 'username'], 'unique_deleted_username');
    }

    function tableInfo()
    {
        return ['users','系统用户表'];
    }
}
